from enum import Enum


class ErrCode(Enum):
    INTERNAL_ERROR = "内部错误"
    RETURN_OK = "成功返回"
    RETURN_EMPTY = "查询为空"
    OFFSET_ERROR = "页码传参错误"
    LIMIT_ERROR = "条数传参错误"
    PARAMETER_EMPTY = "参数为空"
    PARAMETER_ERROR = "参数错误"
    PRICE_CHANGE = "价格变动，重新下单"
    AMOUNT_CHANGE = "价格变动，请刷新"
    STOCK_NONE = "库存不足"
    PRODUCT_ERROR = "商品信息错误"
    STORE_UNIT_FULL = "该仓库已满不能选择"
    REPO_NONE = "仓库已空"
    REPO_ERROR = "仓库信息有误"
    GOODSBLOCK_ERROR = "区块信息有误"
    GOODSBLOCKCHAIN_ERROR = "区块链记录为空"
    MARKET_ERROR = "挂单信息错误"
    MARKET_NULL = "挂单信息不存在"
    REPO_NOT_FOUND = "仓库找不到"
    PAYMENT_METHOD_UNSUPPORTED = "支付方式不支持"
    BALANCE_NOT_SUFFICIENT = "余额不足"
    ORDER_FINISH = "订单已完成"
    ORDER_NULL = "订单信息不存在"
    ORDER_ADDRESS = "地址信息不存在"

    USER_ACCESS_ERROR = "无权操作"

    MARKET_EXCEPT = "订单异常"
    MARKET_AMOUNT_EXCEPT = "当前订单不足以抵扣仓储费/手续费，不能交易"

    CERTIFICATE_UNVERIFIED = "未实名认证，不能操作"
